package com.itheima.exception;

import com.itheima.common.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author :WuJunJie
 * packageName :com.itheima.exception
 * fileName :GobalExceptionHandler
 * creationTime :2022-11-25 20:51
 */
@RestControllerAdvice
@Slf4j
public class GlobalExceptionHandler {

    @ExceptionHandler(TokenException.class)
    public Result TokenExcetptionHandler(){
        return Result.error("NOTLOGIN");
    }
}
